/**
 * 
 */
package org.pump.client.codec;

import java.util.Arrays;

import org.apache.mina.core.buffer.IoBuffer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author liudong03
 *
 */
public class UnknownPack extends ResultPack{
	private static final Logger mylog = LoggerFactory
			.getLogger(UnknownPack.class);
	byte[] content;
	public static UnknownPack readbuffer(IoBuffer in,int len)
	{
		if(in.remaining() < len)
		{
			return null;
		}
		UnknownPack mypack = new UnknownPack();
		mypack.content = new byte[len];
		in.get(mypack.content);
		mypack.len = len;
		
		return mypack;
	}
	/**
	 * 
	 */
	public UnknownPack() {
		// TODO Auto-generated constructor stub
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "UnknownPack [content=" + Arrays.toString(content)
				+ ", resulttype=" + resulttype + ", len=" + len + "]";
	}
	
	
}
